﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Text;
using System.Security.Cryptography;

namespace GiveAQuiz.Common
{
  public static class Security
  {
    const string SecurityKey = "1234567890";

    public static string GenerateTokenRequestKey()
    {
      var cryptic = new SHA1Managed();
      byte[] result = cryptic.ComputeHash(Encoding.UTF8.GetBytes(SecurityKey.PadLeft(35, '%')));

      return Encoding.UTF8.GetString(result, 0, result.Length);
    }
  }
}
